package com.nihao001.parse.handler.impl;

import org.jsoup.select.Elements;

import com.nihao001.parse.handler.Handler;


/**
 * 
 * <p>
 * 	Description:解析xml元素的文本。<br/>
 *  比如：<div>hello world</div><br/>
 *  解析结果是：hello world
 * 	
 * 
 * </p>
 * 
 * <p>Author: wang xing yue</p>
 * <p>Date  :Nov 12, 2013</p>
 *
 */

public class TextHandler implements Handler{

	@Override
	public String parse(String html, Elements eles) {
		if(eles == null || eles.size() == 0){
			return "";
		}
		return eles.first().html().trim();
	}
	
}


